<%@ include file="/common/taglibs.jsp"%>

<style>
#ui-datepicker-div {
	font-family: "Trebuchet MS", "Helvetica", "Arial", "Verdana",
		"sans-serif";
	font-size: 62.5%;
}
</style>
<script>
 
$(function() {
    $("#saveOrUpdateHomeWork_homework_date").datepicker({
	    	changeMonth: true,
        changeYear: true,
	});
});
jQuery(document).ready(function(){
	jQuery("#homework").validate();
});
</script>

<div style="padding: 5px;" align="center"><!-- <span style="font-size: 20px;">Holiday Details</span><br/ --><br />
<br />
<s:form id="homework" name="homework" action="saveOrUpdateHomeWork"
	method="post" validate="true">
	<table border="0">
		<tr>
			<td class="inputField" nowrap="nowrap">ClassYear</td>
			<td>
			<s:select name="classYear"
				id="saveOrUpdatehomework_class_name" emptyOption="true"
				list="classYears" listKey="id" listValue="name"
				cssStyle="width:200px" value="%{homework.getClassYear().getId()}" />
			</td>
		</tr>
		<tr>
			<td class="inputField" nowrap="nowrap">Section</td>
			<td><s:select name="section"
				id="saveOrUpdatehomework_section_name" emptyOption="true"
				list="sectionList" listKey="id" listValue="sectionName"
				cssStyle="width:200px" value="%{homework.getSection().getId()}" /></td>

		</tr>
		<tr>
			<td class="inputField" nowrap="nowrap">Subject</td>
			<td><s:select name="subject"
				id="saveOrUpdatehomework_subject_name" emptyOption="true"
				list="subjectList" listKey="id" listValue="subjectName"
				cssStyle="width:200px" value="%{homework.getSubject().getId()}" />
			</td>
		</tr>
		<tr>
			<td class="inputField" nowrap="nowrap">Date</td>
			<td class="inputTextBox"><s:textfield type="date" size="10"
				name="homeWork.date" id="saveOrUpdateHomeWork_homework_date"
				style="width:250px;" cssClass="required" /></td>
		</tr>
		<tr>
			<td class="inputField" nowrap="nowrap">Home Work</td>
			<td class="inputTextBox"><s:textarea
				id="saveOrUpdateHomeWork_homework_description" name="homeWork.description"
				style="width:300px;height:100px" required="true" cssClass="required" />
			</td>
		</tr>
		<tr>
			<td class="inputField" nowrap="nowrap">Status</td>
			<td class="inputTextBox"><s:radio name="homeWork.status"
				id="saveOrUpdateHomeWork_homework_status"
				list="#{'Active':'Active','InActive':'InActive'}"
				value="%{homework.getStatus()}" /></td>
		</tr>
		<tr>
			<td colspan="2"><s:reset value="Clear"
				id="saveOrUpdateHomeWork_0" cssClass="button-gray" theme="simple" />
			<s:if test="homework.id == '' ">
				<s:submit value="Create" id="ssaveOrUpdateHomeWork_0"
					cssClass="button-green" theme="simple" />
			</s:if> <s:else>
				<s:submit value="Update" id="saveOrUpdateHomeWork_0"
					cssClass="button-green" theme="simple" />
			</s:else> <input type="button" value="List" id="saveOrUpdateHomeWork_0"
				class="button-gray" onclick="javascript:showLists('/showHomeWorkList');" /></td>
		</tr>

	</table>
	<s:hidden id="id" name="homework.id"></s:hidden>
</s:form></div>
